<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:php="http://php.net/xsl"
	version="1.0">

	<!-- Passport Logo -->
	<xsl:template name="passport-logo">
		<div class="passport-logo">
			<img src="/images/passport.png" alt="{php:function('lang','passport')}"/>
		</div>
	</xsl:template>

	<!-- View user picture -->
	<xsl:template name="view-userpic">
		<xsl:choose>
			<xsl:when test="path">
				<img>
					<xsl:attribute name="src">
						<xsl:text>/media/userpic/</xsl:text>
						<xsl:value-of select="path"/>
						<xsl:value-of select="php:function('image_type_to_extension',string(frmt))"/>
					</xsl:attribute>
				</img>
			</xsl:when>
			<xsl:otherwise>
				<img src="/images/no-ava.gif"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
</xsl:stylesheet>